package org.dreamwork.jasmine2.editor.ckeditor.controls;

import org.dreamwork.jasmine2.events.EventException;
import org.dreamwork.jasmine2.web.IWebContainer;
import org.dreamwork.jasmine2.web.IWebControl;
import org.dreamwork.jasmine2.web.controls.Literal;
import org.dreamwork.jasmine2.web.controls.WebContainer;

import java.io.IOException;
import java.io.PrintWriter;

/**
 * Created by IntelliJ IDEA.
 * User: seth.yang
 * Date: 12-7-18
 * Time: 下午4:47
 */
public class AbstractCKEditorConfigControl extends WebContainer {
    protected CKEditorControl editor;
    @Override
    public void setParent (IWebContainer parent) {
        if (!(parent instanceof CKEditorControl))
            throw new IllegalStateException ("CKEditorToolbar can't use here! It must be a child of CKEditor");
        editor = (CKEditorControl) parent;
        super.setParent (parent);
    }

    @Override
    public void render (PrintWriter writer) throws IOException, EventException {
    }
}